package com.ymtms.arrivalofgoods.utils;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2016100900648647";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key ="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCbOChhNbFyekce/WzuQhKa5zgGj5DWkE62ppp9pajnSUW+YhrXeFzRhSOpwsP+vgaUnHeH8eY6QfJ33XTFouQL6OVoExEqGKg2cQAibK7WZa8+RBUoWsONhJkYU7nd/BVwCXsgeT0OGyeawtv6Gn9/Epx/glznzCha3Lht1Gge16dK0M3p4/QzAI9YY2jHJMnTA77NCkItdgdVvEFg74sSYjDriWMZD5W87J+1AXnneSFDMbzMqywEQ0Ui7sOs1FG8UAkW6m2uNc8Gc9izPfo4OJbDUeUJfNZpbZ5Qpl273fKxrx+XLTTsNbiv3gWqRtY+kqjQ5JSY1Zu8pXzJXfhbAgMBAAECggEABD6E3CObtoWhbDeBwwILgDDSV1uVmkhX3qavkr/03l4iihIkqb+gyhnZ38pzkYOgqm+c1RrIMM+c0ao8hyrtEWZM34ul7IDAGLz+Q/K01SfyosE50uCoeDYn+YJQksFR1L5tn3WxNbGIY7LwUOZolhDsNpBZ+fybHeDrKhWkwzMXd/ykoHgo+c7dOYzpwtdgCtmY80PWI/35YXdqfWWB66cGkCMYlHIK8lODHAH9nJWqgtTdrbhIgxF0dtm/tICi62H8CA4wpAU3E3xyX+mwroI6wE5rSgZbsKpYKTTu3R/WL4PSGARuRkVSdYkMUFPTgMMorztXRJqSBS9vcBwoAQKBgQDNUE5tso3D2ViYsEF9JJke/mSgw1UL8REY5ukovLubvwBF7aYQp48DVRbI5YVI7R7g8AXfg2LYSl/SQk8eQJ2jBRKFp2dV2OyNZGk3+POJ3ab6XsaoQQ6k4zOw+N90dSEJtC4BmF9DUtr682mFY9OtmmnGnblHtGxuCrGe2UW7rwKBgQDBiewAoPBEo/b1dGYE0Bj4OhoAxZhwi85zFZFjYerjuz9Q012BXbLxyA40l+Y+5VAYQPmBfQCUY+SojE61rCoxkffiAFZsFrw+Gq5crSN/LrluUPK5SnsXYMrzsVXCIBECOcoHu5YwEfvHnRjO75KcjqL2bgXM5m8W33V+ALldFQKBgQCUkcgvGUX8swqpcuHw7Mrg4rVun+qq+YalvnJ6SBh6W3yXHaFN6/JRNwGF3pDUdMIjg4y8cRbV7Pvp6pHWEmv/y2vby4e7V33V0xNQrZWN7hcmle6rUmiGaOK+7VjFrPx7SScBgIFu9kX/0qRJIjPLLDHex8OLX8QW3SYrDI6pgQKBgGsWC1VVt1vjdXPe0cv78LT4QQcITg6H7NVUq7tXpIYZRzFLokNAOxD45pNHMQjADQ8+dE+ngLiahRyVdb+j4TzITWXpVeg8tC+Qx8VTr35htgxKEeNgSLdowSMRjif5Yi/fFeAtdS5n5O5QCDgH6xFhAt5jhiYXooP/ZJ0xfV75AoGBAL1mq751rKYXHhX11Ykx3lSn1HvxMou4X93al5Q70zmNp52UeiHRJrwx8bQpHtn7BNwaKEVEBJkUVPAF894Q94Wb5ZuR//jK517/CLGJOntCh5/9g2RuGzLfCyZsnn9wfX5WxIx0P4Z1hOuh33GfziIc+Rechy65QcwEPqQwmfKA";
    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key ="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAj2eWLcCofccGdAYMZ06GpROg7wttU7UrSjN7mXgW9aNs3C0LmE0gF7RDKPq3HtMRgRVYcxuM/DK6ANMW/J1KT4umRjsgtYQb9WHN2epE+C4bB6OxBpV43zvGRCQ0DqfUeiV5ZmkFXOqKUpNge133rQUdO6/OIEPM/Cs3c7pq38zlgyWJzYOgFENJRk8AumAPWqx4cWeMnIHTgBqLMXz+g3FVKu8GdbbICo1QIe405JDJ0bBIsolbrPTxgz7otf3EQMdPYksACJSg4+xgoDa2wwBxYicela1Y0agoQBvR3jrqhDIHsTNiHOM+MJ0w7+WMj2YCRgrbYyNjh7DEQOPjOwIDAQAB";
    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://259k2303x3.zicp.vip/notifyArriveReceipt";
    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://259k2303x3.zicp.vip/returnArriveReceipt";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "E:\\";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
